Option Explicit On 
Option Strict On

Imports TreeCreeper01Interfaces

Friend Class cSpeciesAbundance
    Implements ISpeciesAbundance

    Private pSpecies As ITaxonomicSpecies
    Private pAbundance As Double


    Public Sub New(ByVal SpeciesNode As ITaxonomicSpecies, Optional ByVal Abundance As Double = 1)
        pSpecies = SpeciesNode
        pAbundance = Abundance
    End Sub

    Public Sub NormaliseAbundance(ByVal NormalisingMaximum As Double)
        pAbundance = pAbundance / NormalisingMaximum
    End Sub

    Public ReadOnly Property Abundance() As Double Implements ISpeciesAbundance.Abundance
        Get
            Return pAbundance
        End Get
    End Property


    Public ReadOnly Property TaxonomicSpecies() As ITaxonomicSpecies Implements ISpeciesAbundance.TaxonomicSpecies
        Get
            Return pSpecies
        End Get
    End Property

    Public ReadOnly Property UniqueKey() As String Implements ISpeciesAbundance.UniqueKey
        Get
            Return pSpecies.UniqueKey
        End Get
    End Property

End Class
